/**
 *Copyright(c) HNA SYSTEMS Co., LTD
 *
 *@date 2013-7-23
 * 	
 *Original Author: 郑兴(zhengxing)
 *
 *ChangeLog
 *
 */
package com.hnas.sys.service.system.mapper;

import org.springframework.beans.BeanUtils;

import com.hnas.core.mapper.Mapper;
import com.hnas.sys.orm.Resource;
import com.hnas.sys.service.system.dto.DTOResource;

/**
 * @author 郑兴(zhengxing)
 *
 */
public class ResourceMapper extends Mapper<DTOResource, Resource> {
	private static ResourceMapper userMapper;
	
	private ResourceMapper() {
		super(DTOResource.class, Resource.class);
	}
	
	public static ResourceMapper getInstance() {
		if (userMapper == null) {
			userMapper = new ResourceMapper();
		}
		return userMapper;
	}
	public  DTOResource mapToValue(Resource vo){
		DTOResource dto = new DTOResource();
		BeanUtils.copyProperties(vo, dto, new String[]{"authorityResources",""});
		return dto;
	}
}
